import re

s = input("请输入:\n >")
cmp = re.compile(r'[A-Z]{3}[a-z]{1}[A-Z]{3}|g')
res = cmp.findall(s)
for i in res:
    print(i[3], end='')